\(\int \frac {-x^2+2 x^4}{1+2 x^2} \, dx\) [112]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 25 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=-x+\frac {x^3}{3}+\frac {\arctan \left (\sqrt {2} x\right )}{\sqrt {2}} \]

[Out]

-x+1/3*x^3+1/2*arctan(x*2^(1/2))*2^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {1607, 470, 327, 209} \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=\frac {\arctan \left (\sqrt {2} x\right )}{\sqrt {2}}+\frac {x^3}{3}-x \]

[In]

Int[(-x^2 + 2*x^4)/(1 + 2*x^2),x]

[Out]

-x + x^3/3 + ArcTan[Sqrt[2]*x]/Sqrt[2]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p + 1) + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps \begin{align*} \text {integral}& = \int \frac {x^2 \left (-1+2 x^2\right )}{1+2 x^2} \, dx \\ & = \frac {x^3}{3}-2 \int \frac {x^2}{1+2 x^2} \, dx \\ & = -x+\frac {x^3}{3}+\int \frac {1}{1+2 x^2} \, dx \\ & = -x+\frac {x^3}{3}+\frac {\tan ^{-1}\left (\sqrt {2} x\right )}{\sqrt {2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=-x+\frac {x^3}{3}+\frac {\arctan \left (\sqrt {2} x\right )}{\sqrt {2}} \]

[In]

Integrate[(-x^2 + 2*x^4)/(1 + 2*x^2),x]

[Out]

-x + x^3/3 + ArcTan[Sqrt[2]*x]/Sqrt[2]

Maple [A] (verified)

Time = 3.49 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84

method result size
default \(-x +\frac {x^{3}}{3}+\frac {\arctan \left (\sqrt {2}\, x \right ) \sqrt {2}}{2}\) \(21\)
risch \(-x +\frac {x^{3}}{3}+\frac {\arctan \left (\sqrt {2}\, x \right ) \sqrt {2}}{2}\) \(21\)
meijerg \(\frac {\sqrt {2}\, \left (-\frac {2 x \sqrt {2}\, \left (-10 x^{2}+15\right )}{15}+2 \arctan \left (\sqrt {2}\, x \right )\right )}{8}-\frac {\sqrt {2}\, \left (2 \sqrt {2}\, x -2 \arctan \left (\sqrt {2}\, x \right )\right )}{8}\) \(49\)

[In]

int((2*x^4-x^2)/(2*x^2+1),x,method=_RETURNVERBOSE)

[Out]

-x+1/3*x^3+1/2*arctan(2^(1/2)*x)*2^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=\frac {1}{3} \, x^{3} + \frac {1}{2} \, \sqrt {2} \arctan \left (\sqrt {2} x\right ) - x \]

[In]

integrate((2*x^4-x^2)/(2*x^2+1),x, algorithm="fricas")

[Out]

1/3*x^3 + 1/2*sqrt(2)*arctan(sqrt(2)*x) - x

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=\frac {x^{3}}{3} - x + \frac {\sqrt {2} \operatorname {atan}{\left (\sqrt {2} x \right )}}{2} \]

[In]

integrate((2*x**4-x**2)/(2*x**2+1),x)

[Out]

x**3/3 - x + sqrt(2)*atan(sqrt(2)*x)/2

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=\frac {1}{3} \, x^{3} + \frac {1}{2} \, \sqrt {2} \arctan \left (\sqrt {2} x\right ) - x \]

[In]

integrate((2*x^4-x^2)/(2*x^2+1),x, algorithm="maxima")

[Out]

1/3*x^3 + 1/2*sqrt(2)*arctan(sqrt(2)*x) - x

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=\frac {1}{3} \, x^{3} + \frac {1}{2} \, \sqrt {2} \arctan \left (\sqrt {2} x\right ) - x \]

[In]

integrate((2*x^4-x^2)/(2*x^2+1),x, algorithm="giac")

[Out]

1/3*x^3 + 1/2*sqrt(2)*arctan(sqrt(2)*x) - x

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {-x^2+2 x^4}{1+2 x^2} \, dx=\frac {\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,x\right )}{2}-x+\frac {x^3}{3} \]

[In]

int(-(x^2 - 2*x^4)/(2*x^2 + 1),x)

[Out]

(2^(1/2)*atan(2^(1/2)*x))/2 - x + x^3/3